package com.wgj.android.ui.activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.widget.FrameLayout;
import com.jiaai.xui.view.widget.XTopbarView;
import com.jiaai.xui.view.widget.tablayout.SegmentTabLayout;
import com.wgj.android.R;
import com.wgj.android.entity.Member;
import com.wgj.android.http.WGJAPI;
import com.wgj.android.utils.CacheUtils;
import com.wgj.android.web.XXXWebFragment;
import com.wgj.android.web.entity.WebConfig;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
public class MyVipActivity extends AppCompatActivity {
    private Member member;
    private ArrayList<Fragment> mFragments = new ArrayList<>();
    private String[] mTitles= {"一星", "二星", "三星"};
    @BindView(R.id.topbarView)
    XTopbarView topbarView;

    @BindView(R.id.tabLayoutView)
    SegmentTabLayout tabLayout;

    @BindView(R.id.contentView)
    FrameLayout frameLayout;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.setContentView(R.layout.my_vip_activity);
        ButterKnife.bind(this);
        Member member= CacheUtils.getMember();
        mFragments.add(XXXWebFragment.getInstance(new WebConfig(WGJAPI.BASEURL+"page/vip1list/"+member.getM_id(),"",0)));
        mFragments.add(XXXWebFragment.getInstance(new WebConfig(WGJAPI.BASEURL+"page/vip2list/"+member.getM_id(),"",0)));
        mFragments.add(XXXWebFragment.getInstance(new WebConfig(WGJAPI.BASEURL+"page/vip3list/"+member.getM_id(),"",0)));
/*
        mFragments.add(WGJWebFragment.getInstance(new WebConfig(WGJAPI.BASEURL+"page/vip1list/"+member.getM_id(),"",0)));
        mFragments.add(WGJWebFragment.getInstance(new WebConfig(WGJAPI.BASEURL+"page/vip2list/"+member.getM_id(),"",0)));
        mFragments.add(WGJWebFragment.getInstance(new WebConfig(WGJAPI.BASEURL+"page/vip3list/"+member.getM_id(),"",0)));
*/
        tabLayout.setTabData(mTitles,this,R.id.contentView,mFragments);
        tabLayout.setCurrentTab(0);
    }




}
